package com.izliang.gateway.client.user;

import model.User;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;
import service.UserService;

@Service
public class UserClient {

    @Reference(loadbalance = "roundrobin", cluster = "failfast", check = false,mock = "com.izliang.gateway.client.user.UserClientCallBack")
    private UserService userService;

    public User getUser(int id) {
        return userService.findUserInfoById(id);
    }

    public void subUserMoney(){userService.subUserMoney();}
}
